<!DOCTYPE html>
<html lang="en">
<head>
  <title>Top 10 Most ${curSort.name} TikTok Users<#if curRegion??> in ${curRegion.name}</#if> in ${time} | GugeeData</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  <meta name="baidu-site-verification" content="7Kv8mw99Qh" />
  <meta name="google-site-verification" content="YPMm_1_f59WXKSd04F1LGCjKeDGVrf_ajrylNKEDtqg" />
  <meta name="keywords" content="TikTok Follower Count, TikTok Trends, Creator of TikTok, TikTok Realtime, TikTok Famous, TikTok Rank, TikTok Analytics, TikTok Followers Comparison">
  <meta name="description" content="These are the Top 10 users who has the most ${curSort.key} on TikTok<#if curRegion??> in ${curRegion.name}</#if> right now. ">
  <meta property="og:title" content="Top 10 Most ${curSort.name} TikTokers<#if curRegion??> in ${curRegion.name}</#if> in ${time} | GugeeData">
  <meta property="og:description" content="View the top 10 most ${curSort.name} TikTok users<#if curRegion??> in ${curRegion.name}</#if> on GugeeData">
  <meta name="twitter:title" content="Top 10 Most ${curSort.name} TikTok users<#if curRegion??> in ${curRegion.name}</#if> in ${time} | GugeeData">
  <meta name="twitter:description" content="View the top 10 most ${curSort.name} TikTok users<#if curRegion??> in ${curRegion.name}</#if> on GugeeData.">
  <link rel="icon" href="${request.contextPath}/static/img/favicon.ico" type="image/x-icon" />
  <link rel="shortcut icon" href="${request.contextPath} /static/img/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="${request.contextPath}/static/css/reset.css">
  <#if isMobile == false>
    <link rel="stylesheet" href="${request.contextPath}/static/css/common.css">
    <link rel="stylesheet" href="${request.contextPath}/static/css/influence.css">
  <#else>
    <link href="https://fonts.googleapis.com/css2?family=Oswald:wght@500&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="${request.contextPath}/static/css/mobile/common.css">
    <link rel="stylesheet" href="${request.contextPath}/static/css/mobile/influence.css">
  </#if>
</head>
<body>
  <#include "../header_new.ftl">
  <#if isMobile == false>
    <main>
      <section>
        <div class="wrapper wrap-influence">
          <h1>${titleDescription.title}</h1>
          <h3>${titleDescription.subtitle}</h3>
          <div class="main-content">
            <div class="influence-type">
              <div class="left">
                <ul>
                  <#list sortList as sort>
                    <li class="<#if sort.active><#assign activeSort=sort.key/>is-active</#if>">
                      <#if curRegion??>
                        <a href="${contextPath}/influencer/${sort.key}/${curRegion.code}">${sort.name}</a>
                      <#else>
                        <a href="${contextPath}/influencer/${sort.key}">${sort.name}</a>
                      </#if>
                    </li>
                  </#list>
                </ul>
              </div>
              <div class="right">
                <div class="search-box">
                  <input id="searchInput" value="<#if curRegion??>${curRegion.name}</#if>" onfocus="showSearchContent()" onblur="hideSearchContent(this)" onkeyup="searchAddress(this)" placeholder="Country or Region" />
                  <i id="searchClose" onclick="clearInput()" class="iconfont iconguanbi"></i>
                  <i id="searchDown" onclick="showSearchContent()"  class="iconfont icondown1"></i>
                </div>
                <div class="search-content" id="searchContent">
                  <ul>
                    <li class="search-item" data-name="All">
                      <a class="search-item-link" href="${contextPath}/influencer/${activeSort}">All</a>
                    </li>
                    <#list regionList as country>
                      <li class="search-item" data-name="${country.name}">
                        <a class="search-item-link" href="${contextPath}/influencer/${activeSort}/${country.code}">${country.name}</a>
                      </li>
                    </#list>
                  </ul>
                </div>
              </div>
            </div>
            <table class="tb-main">
              <thead>
              <tr>
                <th class="tx-left" width="10%">Rank</th>
                <th class="tx-left" width="32%">TikToker</th>
                <th class="th-gd" width="12%">
                  GD Score
                  <#--                <i onmouseover="showTips(this)" onmouseout="hideTips(this)" class="iconfont iconbangzhu">-->
                  <#--                  <div>-->
                  <#--                    GD Index is used to evaluate the account's comprehensive performance. The higher the index the better the account valued.-->
                  <#--                  </div>-->
                  <#--                </i>-->
                </th>
                <th width="10%">Followers</th>
                <th width="10%">Likes</th>
                <th width="10%">Posts</th>
                <th width="8%">Detail</th>
              </tr>
              </thead>
              <tbody>
              <#list dataList as data>
                <tr>
                  <td class="td-inx">
                  <span class="tb-inx">
                    <#if data_index lt 9>
                      0${data_index+1}
                    <#else>
                      ${data_index+1}
                    </#if>
                  </span>
                  </td>
                  <td class="tb-tiktoker">
                    <div>
                      <img src='${data.avatar}' />
                      <!--<img src="./static/img/tick.png"></img>-->
                    </div>
                    <div>
                      <div class="tb-name">
                        ${data.nickName}
                        <svg title="${data.region}" class="icon icon-country" aria-hidden="true">
                          <use xlink:href="#icon_${data.region}"></use>
                        </svg>
                      </div>
                      <div style="color: #909399">${data.uniqueId}</div>
                    </div>
                  </td>
                  <td>${data.score}</td>
                  <td>${data.followerCount}</td>
                  <td>${data.totalFavorited}</td>
                  <td>${data.awemeCount}</td>
                  <td>
                    <div class="td-action">
                      <div class="blue">
                        <a href="${contextPath}/tiktoker/${data.uniqueId}" target="_blank">
                          <i class="iconfont iconxiangqing" title="analyze"></i>
                        </a>
                      </div>
                    </div>
                  </td>
                </tr>
              </#list>
              </tbody>
              <!-- tbody end -->
              <tfoot>
              <tr>
                <td colspan="8">
                  <#if login == false>
                    <a href="javascript:;" onclick="toLogin()">
                      <span>View More</span>
                    </a>
                  <#else>
                    <a href="https://tk.gugeedata.com/#/tiktoker/ranks">
                      <span>View More</span>
                    </a>
                  </#if>
                </td>
              </tr>
              </tfoot>
            </table>
          </div>
        </div>
      </section>
    </main>
    <#include "../footer.ftl">
    <script>
      document.addEventListener("mousedown", function(e){
        if (e.target.classList[0] === 'search-item-link' || e.target.classList[0] === 'search-item'
                || e.target.classList[0] === 'search-box' || e.target.classList[0] === 'iconfont') {
          e.preventDefault()
        }
      }, false)
      // 搜索栏
      function clearInput () {
        document.getElementById('searchInput').value = ''
      }
      function showSearchContent () {
        document.getElementById('searchContent').style.display = 'block'
      }
      function hideSearchContent (_this) {
        _this.value = ''
        document.getElementById('searchContent').style.display = 'none'
        document.getElementById('searchDown').style.display = 'block'
        document.getElementById('searchClose').style.display = 'none'
        let countries = document.querySelectorAll('.influence-type .right li')
        for(let i=0;i<countries.length;i++) {
          countries[i].style.display = 'list-item'
        }
      }
      function searchAddress (_this) {
        document.getElementById('searchContent').style.display = 'block'
        let val = _this.value.toUpperCase()
        if(val.length > 0) {
          document.getElementById('searchDown').style.display = 'none'
          document.getElementById('searchClose').style.display = 'block'
        }
        let countries = document.querySelectorAll('.influence-type .right li')
        let isAllNone = true
        for(let i=0;i<countries.length;i++) {
          let dataName = countries[i].getAttribute('data-name').toUpperCase()
          if(dataName.indexOf(val) > -1) {
            countries[i].style.display = 'list-item'
            isAllNone = false
          } else {
            countries[i].style.display = 'none'
          }
        }
        if(isAllNone) {
          document.getElementById('searchContent').style.display = 'none'
        }
      }
    </script>
  <#else>
    <#include './mobile/index.ftl'>
  </#if>
</body>
</html>
